﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WinCoreV3Run
{
    public partial class Form1 : Form
    {
        MyCameral cam;
        public Form1(string code)
        {
            InitializeComponent();
            MyParam.MyParam_Init(code);
            if (MyParam.showWindow == 1)
            {
                MessageBox.Show(MyParam.toString());
            }
           
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            cam = new MyCameral();
            cam.StartCamera(this.pictureBox1.Handle);
        }

        private void Form1_FormClosing(object sender, FormClosingEventArgs e)
        {
            cam.CloseCamera();
        }
    }
}
